<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>师资力量</title>
    <link th:href="@{/img/Bandit.ico}" rel="icon">
    <link th:href="@{/layui/css/layui.css}" rel="stylesheet">
    <link th:href="@{/css/public.css}" rel="stylesheet">
    <style>
        .teacher-show{
            display: flex;
            flex-wrap: wrap;
            justify-content: flex-start;
            padding: 20px;
        }
        .teacher{
            border: 2px solid #064078;
            border-radius: 5px;
            display: flex;
            align-items: center;
            justify-content: flex-start;
            flex-direction: column;
            background: #e3e3e3;
            box-shadow:0 0 9px 3px #888888;
            width: auto;
            margin: 20px;
            padding: 10px;
        }
        .teacher-img{
            border-radius: 5px;
            border: 2px solid #8d535c;
        }
        .teacher-info{
            margin-top: 20px;
            padding: 5px;
            border-radius: 5px;
            border: 2px solid #616060;
            text-align: center;
        }
    </style>
</head>
<div th:replace="~{commons/common::MyHeader}"></div>
<body>
<div class="layui-main">
    <div class="layui-card">
        <div class="layui-card-header">
            <p>老师详情信息</p>
        </div>
        <div class="layui-card-body teacher-show">
            <div class="teacher">
                <div class="teacher-img">
                    <img style="width: 200px; object-fit: contain"  th:src="${teacher.teacherImg}">
                </div>
                <div class="teacher-info">
                    <strong>姓名：</strong><span th:text="${teacher.tName}"></span>
                    <br>
                    <strong>职位：</strong><span th:each="role:${roleList}" th:text="${role.roleName}" th:if="${role.rid eq teacher.roleID}"></span>
                    <hr class="layui-border-black">
                    <p th:text="${teacher.details}" style="text-indent: 2em;text-align: justify"></p>
                </div>
            </div>
        </div>
    </div>
</div>

<script th:inline="javascript">
    var roleList = [[${roleList}]];
</script>
<div th:replace="~{commons/common::pubScript}"></div>
</body>
</html>